Skip to content

fix(cast): skip HyperEVM system transactions on replay - #16451

Merged
mattsse merged 1 commit into
masterfrom
mattsse/hl-system-sender
Aug 29, 2026
Merged

fix(cast): skip HyperEVM system transactions on replay#16451
mattsse merged 1 commit into
masterfrom
mattsse/hl-system-sender

Conversation

@mattsse

@mattsse mattsse commented Aug 28, 2026

Copy link
Copy Markdown
Member

HyperCore credits native HYPE to HyperEVM accounts through transactions sent by 0x2222222222222222222222222222222222222222. They are legacy envelopes with gasPrice = 0, an r/s of 1, and a receipt gasUsed of 0. That sender was not in is_known_system_sender, so block replay executed them like regular transactions and aborted with transaction validation error: gas price is less than basefee — which takes down cast run for every transaction in the block, not just the credit itself. Sparse sampling of recent HyperEVM blocks put these in roughly 1% of them.

Adding the address to the known system senders makes both cast run and the fork backend skip them, the same way Arbitrum, Optimism, Monad and MegaETH system transactions are already skipped. Skipping is also the right state: the credit lands in the block being replayed, and the fork DB resolves balances at the parent, so the pre-credit balance is what the following transactions should see.

Before, every transaction in HyperEVM block 44427759 failed the base fee check. After, all four user transactions replay to the exact receipt gas (134377, 134365, 39302, 119578), and targeting the credit itself reports is a system transaction instead of an EVM error. Transactions in blocks without a credit are unaffected.

Found while looking into how well the suite reproduces HyperEVM execution. With this and an archive RPC, cast run matched the receipts on 22 of 24 sampled transactions; the two that still differ call the node-native HyperCore read precompiles at 0x0800-0x0810, which is a separate problem and relates to #7262.

Related: #10863, #10827, #10820.


This PR was written by Claude Code: the investigation that found the bug, the change, and this description. Verified against live HyperEVM blocks as described above.

HyperCore -> HyperEVM native transfers are submitted by
0x2222222222222222222222222222222222222222 as legacy envelopes with a
gas price of 0 and a receipt gasUsed of 0. Because that sender was not
recognized as a system sender, block replay executed them as regular
transactions and aborted with "gas price is less than basefee", which
broke `cast run` for every transaction in such a block.

Replaying the five transactions of HyperEVM block 44427759 now matches
the receipts exactly, where previously all of them failed.
@github-actions

Copy link
Copy Markdown
Contributor

✅ Changelog found

The deterministic check will validate the changed entry.

@mattsse
mattsse merged commit b560611 into master Aug 29, 2026
28 checks passed
@mattsse
mattsse deleted the mattsse/hl-system-sender branch August 29, 2026 08:28
@github-project-automation github-project-automation Bot moved this to Done in Foundry Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant